<!doctype html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="hexo," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="提前说明：
假设网站的根目录为D:/Hexo/，也称为 站点目录站点配置文件   是指网站目录下的_config.yml文件，即D:/Hexo/_config.yml主题配置文件  是指网站目录下对应的主题文件夹下的_config.yml文件，即D:/Hexo/themes/next/_config.yml.下面的功能设置完成后，记得1hexo g -d
以完成网站的生成与部署。—————————">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo博客使用系列（五）——NexT主题个性化设置">
<meta property="og:url" content="http://yoursite.com/2017/02/05/Hexo博客使用系列（五）——NexT主题个性化设置/index.html">
<meta property="og:site_name" content="远方的田野">
<meta property="og:description" content="提前说明：
假设网站的根目录为D:/Hexo/，也称为 站点目录站点配置文件   是指网站目录下的_config.yml文件，即D:/Hexo/_config.yml主题配置文件  是指网站目录下对应的主题文件夹下的_config.yml文件，即D:/Hexo/themes/next/_config.yml.下面的功能设置完成后，记得1hexo g -d
以完成网站的生成与部署。—————————">
<meta property="og:image" content="http://okbrg0sur.bkt.clouddn.com/n1.png">
<meta property="og:image" content="http://okbrg0sur.bkt.clouddn.com/n2.png">
<meta property="og:image" content="http://okbrg0sur.bkt.clouddn.com/n3.png">
<meta property="og:image" content="http://okbrg0sur.bkt.clouddn.com/n4.png">
<meta property="og:updated_time" content="2017-03-13T13:46:21.278Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Hexo博客使用系列（五）——NexT主题个性化设置">
<meta name="twitter:description" content="提前说明：
假设网站的根目录为D:/Hexo/，也称为 站点目录站点配置文件   是指网站目录下的_config.yml文件，即D:/Hexo/_config.yml主题配置文件  是指网站目录下对应的主题文件夹下的_config.yml文件，即D:/Hexo/themes/next/_config.yml.下面的功能设置完成后，记得1hexo g -d
以完成网站的生成与部署。—————————">
<meta name="twitter:image" content="http://okbrg0sur.bkt.clouddn.com/n1.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '苦逼的小编'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2017/02/05/Hexo博客使用系列（五）——NexT主题个性化设置/"/>





  <title> Hexo博客使用系列（五）——NexT主题个性化设置 | 远方的田野 </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  



  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?e417506f572cec8b5148f4903cd137e8";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>








  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">远方的田野</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
    
      <h1 class="site-subtitle" itemprop="description">Thought is the power.---(France)Hugo</h1>
    
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-sitemap">
          <a href="/sitemap.xml" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-sitemap"></i> <br />
            
            Sitemap
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup">
 <span class="search-icon fa fa-search"></span>
 <input type="text" id="local-search-input">
 <div id="local-search-result"></div>
 <span class="popup-btn-close">close</span>
</div>


    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2017/02/05/Hexo博客使用系列（五）——NexT主题个性化设置/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JM Lin">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="http://okbrg0sur.bkt.clouddn.com/super-mario-2003942_1920.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="远方的田野">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="远方的田野" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h2 class="post-title" itemprop="name headline">
            
            
              
                Hexo博客使用系列（五）——NexT主题个性化设置
              
            
          </h2>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-02-05T14:50:00+08:00">
                2017-02-05
              </time>
            

            

            
          </span>

          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/2017/02/05/Hexo博客使用系列（五）——NexT主题个性化设置/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2017/02/05/Hexo博客使用系列（五）——NexT主题个性化设置/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="page-pv"><i class="fa fa-file-o"></i>
            <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>
            </span>
          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <p><em>提前说明：</em></p>
<p>假设网站的根目录为D:/Hexo/，也称为 <em>站点目录</em><br>站点配置文件   是指网站目录下的_config.yml文件，即D:/Hexo/_config.yml<br>主题配置文件  是指网站目录下对应的主题文件夹下的_config.yml文件，即D:/Hexo/themes/next/_config.yml.<br>下面的功能设置完成后，记得<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">hexo g -d</div></pre></td></tr></table></figure></p>
<p>以完成网站的生成与部署。<br><del>—————————————————————————————————————————</del></p>
<h2 id="添加分类、标签云、关于等页面"><a href="#添加分类、标签云、关于等页面" class="headerlink" title="添加分类、标签云、关于等页面"></a>添加分类、标签云、关于等页面</h2><p>以添加分类页面为例，在站点目录下，打开git bash，输入<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">hexo new page "categories"</div></pre></td></tr></table></figure></p>
<p>之后在站点目录下的source文件夹下，会新增一个categories的文件夹，里面有一个index.md文件，打开如下：<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">title: categories</div><div class="line">date: 2015-12-04 15:37:22</div><div class="line">type: "categories"</div><div class="line"><span class="section">comments: false</span></div><div class="line">---</div></pre></td></tr></table></figure></p>
<p>其中，comments可以设置为false，含义是打开分类页面，评论插件不显示；如要显示则改为true。</p>
<p>tags, about页面的创建类似，输入<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">hexo new page "tags"</div><div class="line">hexo new page "about"</div></pre></td></tr></table></figure></p>
<h2 id="添加站内搜索功能"><a href="#添加站内搜索功能" class="headerlink" title="添加站内搜索功能"></a>添加站内搜索功能</h2><p>NexT支持Swiftype插件以实现站内搜索功能。<br>Step 1: 注册Swiftype<br>Step 2: 创建一个新的搜索引擎 (点击 Create an engine，按要求创建即可)<br>Step 3: 点击新建的搜索引擎，按如下点击 INSTALL SEARCH<br><img src="http://okbrg0sur.bkt.clouddn.com/n1.png" alt=""><br>然后复制下面蓝色底的字串<br><img src="http://okbrg0sur.bkt.clouddn.com/n2.png" alt=""><br>Step 4: 编辑站点配置文件，添加如下内容<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="section"># Swiftype Search Key</span></div><div class="line">swiftype_key: xxxxxxxxx(粘贴以上复制的内容)</div></pre></td></tr></table></figure></p>
<h2 id="设置右侧栏头像"><a href="#设置右侧栏头像" class="headerlink" title="设置右侧栏头像"></a>设置右侧栏头像</h2><p>编辑站点配置文件，添加如下内容：<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">avatar: your avatar url</div></pre></td></tr></table></figure></p>
<p>其中，your avatar url 可以是<br>(1) 完整的互联网URL，你可以先将设置的头像图片放到图床上；<br>(2) 本地地址：如 /upload/image/avatar.png (你需要将 avatar.png 文件放在/站点目录/source/upload/image/ 里面)。</p>
<h2 id="设置favicon图标"><a href="#设置favicon图标" class="headerlink" title="设置favicon图标"></a>设置favicon图标</h2><p>Step 1:<br>首先要有一个常见格式名(如.jpg, .png等)的图片作为备选favicon，选择一个favicon制作网站完成制作，例如比特虫是一个免费的在线制作ico图标网站。<br>Step 2:<br>将==favicon.ico==文件放在网站根目录下的source文件夹内即可。刷新网站，就可以看到效果了。</p>
<h2 id="添加社交链接"><a href="#添加社交链接" class="headerlink" title="添加社交链接"></a>添加社交链接</h2><p>编辑站点配置文件，添加：<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line">social:</div><div class="line">   github: https://github.com/your-user-name</div><div class="line">   twitter: https://twitter.com/your-user-name</div><div class="line">   weibo: http://weibo.com/your-user-name</div><div class="line">   douban: http://douban.com/people/your-user-name</div><div class="line">   zhihu: http://www.zhihu.com/people/your-user-name</div><div class="line">   # 等等</div></pre></td></tr></table></figure></p>
<p>可根据自身需要自行删减。</p>
<h2 id="添加友情链接"><a href="#添加友情链接" class="headerlink" title="添加友情链接"></a>添加友情链接</h2><p>以添加<a href="https://www.github.com" target="_blank" rel="external">github官网</a> 为友情链接为例<br>编辑站点配置文件，添加如下内容<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="section"># title</span></div><div class="line">links_title: Links</div><div class="line"><span class="section"># links</span></div><div class="line">links:</div><div class="line">   Github: https://www.github.io</div></pre></td></tr></table></figure></p>
<p>其中，links_title为友情链接名称。</p>
<h2 id="添加评论区"><a href="#添加评论区" class="headerlink" title="添加评论区"></a>添加评论区</h2><p>支持Disqus和多说两种评论样式。建议中文网站选择多说，英文网站选择Disqus。下面以Disqus为例说明。<br>Step 1: 注册<a href="https://disqus.com/" target="_blank" rel="external">Disqus</a><br>Step 2: 登陆后进入到Settings，点击Add Disqus To Site，然后点击页面的右上角的Install on Your Site<br>Step 3: 复制你的shortname<br><img src="http://okbrg0sur.bkt.clouddn.com/n3.png" alt=""><br>Step 4: 编辑站点配置文件，添加<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">disqus_shortname: your disqus shortname</div></pre></td></tr></table></figure></p>
<p>这样你的所有文章及页面下面，会自动加载Disqus的评论插件。如果在分类、标签云等页面，不想显示评论区，可以打开这个page文件夹下的md文件，添加<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">comments: false</div></pre></td></tr></table></figure></p>
<h2 id="首页文章以摘要形式显示"><a href="#首页文章以摘要形式显示" class="headerlink" title="首页文章以摘要形式显示"></a>首页文章以摘要形式显示</h2><p>最简单的方式是：打开主题配置文件，找到如下位置，修改<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">auto_excerpt:</div><div class="line">   enable: true</div><div class="line">   length: 150</div></pre></td></tr></table></figure></p>
<p>其中length代表显示摘要的截取字符长度。</p>
<h2 id="设置首页文章显示篇数"><a href="#设置首页文章显示篇数" class="headerlink" title="设置首页文章显示篇数"></a>设置首页文章显示篇数</h2><p>Step 1: 安装相关插件<br>输入如下命令<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">npm install --save hexo-generator-index</div><div class="line">npm install --save hexo-generator-archive</div><div class="line">npm install --save hexo-generator-tag</div></pre></td></tr></table></figure></p>
<p>Step 2:安装完插件后，在站点配置文件中，添加如下内容<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div></pre></td><td class="code"><pre><div class="line">index_generator:</div><div class="line">  per_page: 5</div><div class="line"></div><div class="line">archive_generator:</div><div class="line">  per_page: 20</div><div class="line">  yearly: true</div><div class="line">  monthly: true</div><div class="line"></div><div class="line">tag_generator:</div><div class="line">  per_page: 10</div></pre></td></tr></table></figure></p>
<p>其中per_page字段是你希望设定的显示篇数。index, archive及tag开头分表代表主页，归档页面和标签页面。</p>
<h2 id="设置404公益页面"><a href="#设置404公益页面" class="headerlink" title="设置404公益页面"></a>设置404公益页面</h2><p>在站点目录的source文件夹下，新建404.html文件，将下面的代码复制进去保存即可。<br><figure class="highlight markdown"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div></pre></td><td class="code"><pre><div class="line">&lt;!DOCTYPE HTML&gt;</div><div class="line">&lt;html&gt;</div><div class="line">&lt;head&gt;</div><div class="line"><span class="code">    &lt;title&gt;404 - arao'blog&lt;/title&gt;</span></div><div class="line"><span class="code">    &lt;meta name="description" content="404错误，页面不存在！"&gt;</span></div><div class="line"><span class="code">    &lt;meta http-equiv="content-type" content="text/html;charset=utf-8;"/&gt;</span></div><div class="line"><span class="code">    &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /&gt;</span></div><div class="line"><span class="code">    &lt;meta name="robots" content="all" /&gt;</span></div><div class="line"><span class="code">    &lt;meta name="robots" content="index,follow"/&gt;</span></div><div class="line">&lt;/head&gt;</div><div class="line">&lt;body&gt;</div><div class="line"><span class="code">    &lt;script type="text/javascript" src="http://qzonestyle.gtimg.cn/qzone_v6/lostchild/search_children.js" charset="utf-8"&gt;&lt;/script&gt;</span></div><div class="line">&lt;/body&gt;</div><div class="line">&lt;/html&gt;</div></pre></td></tr></table></figure></p>
<p>显示效果如下<br><img src="http://okbrg0sur.bkt.clouddn.com/n4.png" alt=""></p>
<p>本文转载自：<a href="http://www.jeyzhang.com/next-theme-personal-settings.html" target="_blank" rel="external">http://www.jeyzhang.com/next-theme-personal-settings.html</a></p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        
  <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
    <div>欣赏本文？求打赏！求鼓励！</div>
    <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
      <span>赏</span>
    </button>
    <div id="QR" style="display: none;">
      
        <div id="wechat" style="display: inline-block">
          <img id="wechat_qr" src="http://okbrg0sur.bkt.clouddn.com/wechatpay.png" alt="JM Lin WeChat Pay"/>
          <p>微信打赏</p>
        </div>
      
      
        <div id="alipay" style="display: inline-block">
          <img id="alipay_qr" src="http://okbrg0sur.bkt.clouddn.com/alipay.png" alt="JM Lin Alipay"/>
          <p>支付宝打赏</p>
        </div>
      
    </div>
  </div>


      
    </div>


    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/hexo/" rel="tag"># hexo</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2017/02/04/Hexo博客使用系列（四）——文章里嵌入音乐播放器/" rel="next" title="Hexo博客使用系列（四）——文章里嵌入音乐播放器">
                <i class="fa fa-chevron-left"></i> Hexo博客使用系列（四）——文章里嵌入音乐播放器
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2017/02/05/hexo博客使用系列（六）——将博客部署到codingpages/" rel="prev" title="hexo博客使用系列（六）——将博客部署到codingpages">
                hexo博客使用系列（六）——将博客部署到codingpages <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
        <div class="ds-share flat" data-thread-key="2017/02/05/Hexo博客使用系列（五）——NexT主题个性化设置/"
     data-title="Hexo博客使用系列（五）——NexT主题个性化设置"
     data-content=""
     data-url="http://yoursite.com/2017/02/05/Hexo博客使用系列（五）——NexT主题个性化设置/">
  <div class="ds-share-inline">
    <ul  class="ds-share-icons-16">

      <li data-toggle="ds-share-icons-more"><a class="ds-more" href="javascript:void(0);">分享到：</a></li>
      <li><a class="ds-weibo" href="javascript:void(0);" data-service="weibo">微博</a></li>
      <li><a class="ds-qzone" href="javascript:void(0);" data-service="qzone">QQ空间</a></li>
      <li><a class="ds-qqt" href="javascript:void(0);" data-service="qqt">腾讯微博</a></li>
      <li><a class="ds-wechat" href="javascript:void(0);" data-service="wechat">微信</a></li>

    </ul>
    <div class="ds-share-icons-more">
    </div>
  </div>
</div>
      
    </div>
  </div>

          
          </div>
          


          
  <div class="comments" id="comments">
    
      <div class="ds-thread" data-thread-key="2017/02/05/Hexo博客使用系列（五）——NexT主题个性化设置/"
           data-title="Hexo博客使用系列（五）——NexT主题个性化设置" data-url="http://yoursite.com/2017/02/05/Hexo博客使用系列（五）——NexT主题个性化设置/">
      </div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="http://okbrg0sur.bkt.clouddn.com/super-mario-2003942_1920.jpg"
               alt="JM Lin" />
          <p class="site-author-name" itemprop="name">JM Lin</p>
          <p class="site-description motion-element" itemprop="description">求一佳偶，相伴诗意人生</p>
        </div>
        <nav class="site-state motion-element">
        
          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">13</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">5</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/Javaclear/" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://okbrg0sur.bkt.clouddn.com/%E5%85%AC%E4%BC%97%E5%8F%B7%E4%BA%8C%E7%BB%B4%E7%A0%81" target="_blank" title="微信公众号">
                  
                    <i class="fa fa-fw fa-globe"></i>
                  
                  微信公众号
                </a>
              </span>
            
          
        </div>

        
        

        
        
          <div class="links-of-blogroll motion-element links-of-blogroll-inline">
            <div class="links-of-blogroll-title">
              <i class="fa  fa-fw fa-globe"></i>
              Links
            </div>
            <ul class="links-of-blogroll-list">
              
                <li class="links-of-blogroll-item">
                  <a href="http://weibo.com/5752521860/profile?topnav=1&wvr=6&is_all=1" title="微博" target="_blank">微博</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://wpa.qq.com/msgrd?v=3&amp;uin=1461025291&amp;site=qq&amp;menu=yes" title="有问题请点我" target="_blank">有问题请点我</a>
                </li>
              
            </ul>
          </div>
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#添加分类、标签云、关于等页面"><span class="nav-number">1.</span> <span class="nav-text">添加分类、标签云、关于等页面</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#添加站内搜索功能"><span class="nav-number">2.</span> <span class="nav-text">添加站内搜索功能</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#设置右侧栏头像"><span class="nav-number">3.</span> <span class="nav-text">设置右侧栏头像</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#设置favicon图标"><span class="nav-number">4.</span> <span class="nav-text">设置favicon图标</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#添加社交链接"><span class="nav-number">5.</span> <span class="nav-text">添加社交链接</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#添加友情链接"><span class="nav-number">6.</span> <span class="nav-text">添加友情链接</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#添加评论区"><span class="nav-number">7.</span> <span class="nav-text">添加评论区</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#首页文章以摘要形式显示"><span class="nav-number">8.</span> <span class="nav-text">首页文章以摘要形式显示</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#设置首页文章显示篇数"><span class="nav-number">9.</span> <span class="nav-text">设置首页文章显示篇数</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#设置404公益页面"><span class="nav-number">10.</span> <span class="nav-text">设置404公益页面</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">JM Lin</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Pisces
  </a>
</div>


        

<div class="busuanzi-count">

  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv"><i class="fa fa-user"></i><span class="busuanzi-value" id="busuanzi_value_site_uv"></span></span>
  

  
    <span class="site-pv"><i class="fa fa-eye"></i><span class="busuanzi-value" id="busuanzi_value_site_pv"></span></span>
  
  
</div>



        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.0"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  

  
    
  

  <script type="text/javascript">
    var duoshuoQuery = {short_name:"yuanfangdetianye"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.id = 'duoshuo-script';
      ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
      || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
  </script>

  
    
    
    <script src="/lib/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script>
    <script src="/js/src/hook-duoshuo.js"></script>
  












  
  
  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length == 0) {
      search_path = "search.xml";
    }
    var path = "/" + search_path;
    // monitor main search box;

    function proceedsearch() {
      $("body").append('<div class="popoverlay">').css('overflow', 'hidden');
      $('.popup').toggle();
    }
    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';
      $.ajax({
        url: path,
        dataType: "xml",
        async: true,
        success: function( xmlResponse ) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = $( "entry", xmlResponse ).map(function() {
            return {
              title: $( "title", this ).text(),
              content: $("content",this).text(),
              url: $( "url" , this).text()
            };
          }).get();
          var $input = document.getElementById(search_id);
          var $resultContent = document.getElementById(content_id);
          $input.addEventListener('input', function(){
            var matchcounts = 0;
            var str='<ul class=\"search-result-list\">';
            var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
            $resultContent.innerHTML = "";
            if (this.value.trim().length > 1) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var content_index = [];
                var data_title = data.title.trim().toLowerCase();
                var data_content = data.content.trim().replace(/<[^>]+>/g,"").toLowerCase();
                var data_url = decodeURIComponent(data.url);
                var index_title = -1;
                var index_content = -1;
                var first_occur = -1;
                // only match artiles with not empty titles and contents
                if(data_title != '') {
                  keywords.forEach(function(keyword, i) {
                    index_title = data_title.indexOf(keyword);
                    index_content = data_content.indexOf(keyword);
                    if( index_title >= 0 || index_content >= 0 ){
                      isMatch = true;
                      if (i == 0) {
                        first_occur = index_content;
                      }
                    }

                  });
                }
                // show search results
                if (isMatch) {
                  matchcounts += 1;
                  str += "<li><a href='"+ data_url +"' class='search-result-title'>"+ data_title +"</a>";
                  var content = data.content.trim().replace(/<[^>]+>/g,"");
                  if (first_occur >= 0) {
                    // cut out 100 characters
                    var start = first_occur - 20;
                    var end = first_occur + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if(start == 0){
                      end = 50;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    var match_content = content.substring(start, end);
                    // highlight all keywords
                    keywords.forEach(function(keyword){
                      var regS = new RegExp(keyword, "gi");
                      match_content = match_content.replace(regS, "<b class=\"search-keyword\">"+keyword+"</b>");
                    });

                    str += "<p class=\"search-result\">" + match_content +"...</p>"
                  }
                  str += "</li>";
                }
              })};
            str += "</ul>";
            if (matchcounts == 0) { str = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>' }
            if (keywords == "") { str = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>' }
            $resultContent.innerHTML = str;
          });
          proceedsearch();
        }
      });}

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched == false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(function(e){
      $('.popup').hide();
      $(".popoverlay").remove();
      $('body').css('overflow', '');
    });
    $('.popup').click(function(e){
      e.stopPropagation();
    });
  </script>


  

  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  


</body>
</html>
